package checkpoint;

import java.awt.Component;

import javax.swing.Icon;
import javax.swing.JOptionPane;

/**
 * Lets the user specify what to name his/her station.
 * 
 * @author team07
 */
public class LocationChooser {

	/**
	 * Lets the user choose which type of location he/she is located at (be it
	 * goal or finish location)
	 * 
	 * @return returns the string location
	 */
	public static String getLocation() {
		String[] choices = new String[] { "starttider", "maltider" };
		Component parentComponent = null; // not needed
		String message = "Choose control station: ";
		String title = "Enduro";
		String initialValue = choices[0];
		Icon icon = null;
		return (String) JOptionPane.showInputDialog(parentComponent, message,
				title, JOptionPane.PLAIN_MESSAGE, icon, choices, initialValue);
	}
}
